package com.ycsj.goldmedalnewconcept.activity;

import com.ycsj.goldmedalnewconcept.R;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;

//应用下载
public class AppdownloadActivity extends Activity implements OnClickListener {

	private ImageView iv_back;
	private TextView tv_downApp;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_appdownload);
		initView();
		setOnListener();
		initData();
	}

	private void initView() {
		// TODO Auto-generated method stub
		iv_back = (ImageView) findViewById(R.id.iv_back);
		tv_downApp = (TextView) findViewById(R.id.tv_downApp);
	}

	private void initData() {
		// TODO Auto-generated method stub

	}

	private void setOnListener() {
		// TODO Auto-generated method stub
		iv_back.setOnClickListener(this);
		tv_downApp.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.iv_back:
			finish();
			break;
		case R.id.tv_downApp:
			Intent intent = new Intent();
			intent.setAction("android.intent.action.VIEW");
			Uri content_url = Uri
					.parse("http://42.96.249.154:8080/Appandroid/ChaoGaiNian.apk");
			intent.setData(content_url);
			startActivity(intent);

		}
	}
}






